Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@Rseding91
Rseding91 / AsteroidSpawning.cpp
Created March 19, 2025 09:28
How asteroids spawn
void SpacePlatform::spawnAsteroids()
{
const bool randomOrientation = this->speed < 0.2;
if (SpaceLocationID locationID = this->position.getCurrentLocation())
for (auto& spawnDefinition : locationID->asteroidSpawnDefinitions)
this->trySpawnAsteroid(spawnDefinition.asteroid, spawnDefinition.chunk, spawnDefinition, randomOrientation);
else
{
const PointOnSpaceConnection& pointOnConnection = this->position.getPointOnConnection();
for (auto& spawnDefinition : pointOnConnection.connection->asteroidSpawnDefinitions)
@miantiao-me
miantiao-me / fur-elise.js
Created September 7, 2026 12:05
Play Für Elise on Moonshot AI's interactive About-page piano — https://www.moonshot.ai/about
(() => {
"use strict";
const previousFurElise = window.furElise;
if (previousFurElise && typeof previousFurElise.stop === "function") previousFurElise.stop();
if (
window.pagePianoPiece &&
window.pagePianoPiece !== previousFurElise &&
typeof window.pagePianoPiece.stop === "function"
) {
@minhqnd
minhqnd / export_fap_calendar.md
Last active September 8, 2026 08:21
Xuất lịch học từ FAP (FPT Academic Portal) sang file ICS để import vào Apple Calendar / Google Calendar.

FAP to Calendar

Xuất lịch học từ FAP (FPT Academic Portal) sang file ICS để import vào Apple Calendar / Google Calendar.

Tính năng

  • Xuất lịch học của tất cả các môn trong kỳ hiện tại
  • Support vị trí 5 cơ sở FPT: Hòa Lạc, Đà Nẵng, Cần Thơ, HCM, Quy Nhơn
  • Tự động thông báo thời gian di chuyển dựa vị trí trên
@onevcat
onevcat / AGENTS.md
Created September 5, 2026 08:51
My agent memory file

基本设定

  • 服务对象为 onevcat:资深 iOS 开发者,技术力爆炸,所以不需要废话。重视 “Slow is Fast”、推理质量、抽象与长期可维护性。github.com/onevcat, onevcat.com, onev.cat, onev.dev, x.com/onevcat 等都视为用户相关
  • 代码、注释、标识符、提交信息及代码块内容用标准/简洁/明确的 English。技术文档优先使用 English;若文档现有中文语境,则正文中文、代码块 English。English 遵守 ASD-STE100 Simplified Technical English (STE)。
  • 对需要说明结论、方案或决策的任务,按“直接结论 → 简要推理 → 可选方案 → 可执行下一步”组织,不要长篇大论,不要事无巨细;简单确认、闲聊或一行答案直接回答。
  • 在修改文件时,使用待修改文件中使用的语言,切忌中英文混杂。
  • 处理 GitHub 相关操作优先使用 gh CLI。
  • 目标:作为强推理、强规划的编码助手,首要目标是完成任务。尽量一次到位,减少无谓澄清,只在明确被提问时才解释技术细节。

人设

@Maciejdziuba
Maciejdziuba / README.md
Last active September 8, 2026 08:14
The Software Factory Playbook — Dex Horthy's 4-gate workflow (Product → Architecture → Program Design → Vertical Slices) as an installable Claude Code skill. From the Dex Horthy episode on David Ondrej's podcast.

The Software Factory Playbook — Dex Horthy's 4-gate workflow as a skill

A Claude Code Agent Skill built from Dex Horthy's (HumanLayer) playbook on David Ondrej's podcast.

"Once the model has written thousands of lines of code, it is harder to change. The sessions that generate design docs are context-light — you get the most model intelligence when you do the hard thinking early."

By default, agents build horizontally: all the backend, then all the frontend, then a 2,000-line diff lands in your lap and reviewing it is your problem. This skill flips that. Every decision that matters gets made before the code exists — where changing your mind costs a sentence, not a rewrite.

What it does

#!/bin/bash
# Script by cPFence Team, https://cpfence.app
#
# Description:
# This script performs routine server maintenance tasks:
# - Truncates user error logs larger than 5MB and server logs larger than 100MB, keeping only the last entries using `sponge` (ensure `sponge` is installed on the server).
# - Retains only the last 10 days of system journal logs.
# - Updates and upgrades packages non-interactively and checks if a reboot is required.
# - Clears APT cache to save space.
@rohitg00
rohitg00 / llm-wiki.md
Last active September 8, 2026 08:10 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 20K+ Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.